/*list.h
*/
#ifndef LIST_H_
#define LIST_H_ 
#include <iostream>
#include <string>
using namespace std;
struct customer
{
	string name;
	double consumption;
};
typedef customer Item;

class List
{
private:
	static const int Len=20;
	Item items[Len];
	int top=0;
public:
	List();
	bool isfull()const;
	bool isempty()const;
	bool add(const Item & item);
	void visit(void(*pf)(Item& item));
	void showitem() const;	
	void turnover(Item& item);
};

#endif
